

using System;

class Exercise1 {

  static void Main() {
      
      string username; //declaring the variable that will store the customer name
      
      float price = 0; //declaring and initialising the price of the product
      
      int quantity = 0; //declaring and initialising the quantity of products
      
      Console.Write("Enter the customer name: ");
      username = Console.ReadLine(); //reading the customer name
      
      Console.Write("Enter the price of the object: ");
      float.TryParse(Console.ReadLine(), out price); //reading the object price
      
      Console.Write("Enter the quantity: ");
      quantity = Convert.ToInt32(Console.ReadLine()); //reading the quantity of objects bought
      
      Console.WriteLine("The order total for the user {0} is: {1}", username, calculateTotal(price, quantity)); //printing the total
  }

private static float calculateTotal(float price, int quantity){ //this function calculate the total for the order
    
    return(price * quantity);
    
}

}